
#ifndef DD_LineCapPlugDefine_H_
#define DD_LineCapPlugDefine_H_

#include "DD_CapCfg.h"
#include "DD_ImgCfg.h"

#include "DDErrorDefine.h"
#include "DDSafeDelete.h"
#include "DDAutoDelete.h"

class LineCapPlug
{
public:
	LineCapPlug()
	{
	}
	virtual ~LineCapPlug()
	{
	}

public: 
	//get this plug description
	virtual int GetPlugDescription( zkCapDevDesc *pDescs,int &nCount ) = 0;
	virtual int SelectCap( zkCapDevDesc *pDesc ) = 0;

public:
	//must init
	virtual int Initialize() = 0;
	//
	virtual int GetImgDefine(int &nImgDefine) = 0;
	virtual int GetImgBitPerSap(int &nBitPerSample) = 0;
	virtual int GetImgSapPerPixel(int &nSapPerPixel) = 0;
	virtual int GetImgCapLineTime(int &nCapLineTime) = 0;
	//set capture parameter
	virtual int OpCapConfig(DWORD dwCmd,void *pVoid=NULL,DWORD dwInSize=0,DWORD *pdwOutSize=NULL) = 0;
	//
	virtual int StartCapture() = 0;
	//stop active
	virtual int StopCapture() = 0;
	//
	virtual int GetLinePixelCount(int &nPixelCount) = 0;
	//
	virtual int GetLinePixel(void *pData) = 0;
     
};

//create plug interface,you must delete it 
#ifdef DDCAP_EXPORTS
#define DDCapPlug_API extern "C"  __declspec(dllexport) 
#else 
#define DDCapPlug_API extern "C"  __declspec(dllimport) 
#endif
//DDCapPlug_API int __stdcall CreatePlugMan(ImgCapPlug **ppPlug);
DDCapPlug_API int CreatePlugMan(LineCapPlug **ppPlug);
typedef int (__cdecl * LPOPCREATEPLUGMAN)(LineCapPlug **ppPlug);

#endif